//
//  HPInfo.h
//  HPNetworking
//
//  Created by phq on 2022/3/19.
//  Copyright © 2022 pixy. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HPDefine.h"
typedef void(^HPCallBlock)(BOOL succeed, ATokenType type);
@class HPRequestModel;
NS_ASSUME_NONNULL_BEGIN

@interface HPInfo : NSObject
@property (nonatomic, strong) NSString *url;
@property (nonatomic, strong) NSString *urlPrefix;
@property (nonatomic, strong) NSString *urlPath;
@property (nonatomic, strong) NSString *urlSuffix;

@property (nonatomic, strong) NSString *ver;
@property (nonatomic, copy) NSString *accessToken;
@property (nonatomic, copy) NSString *secret;
@property (nonatomic, assign) ATokenType type;
@property (nonatomic, copy, nullable) HPCallBlock complete;

- (void)infoForcedUpdate:(BOOL)update;
- (NSDictionary*)encodePostParams:(NSString*)pParams getParams:(NSString*)gParams;
- (id)decodeObject:(id _Nullable )object model:(__kindof HPRequestModel *_Nonnull)model;
@end

NS_ASSUME_NONNULL_END
